package parasoft.centrap.test;

import java.util.Date;
import java.util.Vector;

import parasoft.centrap.test.Helper.Builder;

public class inne {


	public static void main(final String[] args) {
		final Builder hb = Builder.create();
		final Helper h = hb.set("Object", null)
				.set("String",
				new String("string")).set("String2", "string2").set("int", 11)
				.set("long", 12l).set("float", 13f).set("double", 14d).set(
						null, null).set("date", new Date()).set("sql-date",
						new java.sql.Date(new Date().getTime())).build();

		p(h,"Object");
		p(h,"String");
		p(h,"String2");
		p(h,"int");
		p(h,"long");
		p(h,"float");
		p(h,null);
		p(h,"date");
		p(h,"sql-date");

//		public static void set(Map<String, String> newenv) throws Exception {
//	    Class[] classes = Collections.class.getDeclaredClasses();
//	    Map<String, String> env = System.getenv();
//	    for(Class cl : classes) {
//	        if("java.util.Collections$UnmodifiableMap".equals(cl.getName())) {
//	            Field field = cl.getDeclaredField("m");
//	            field.setAccessible(true);
//	            Object obj = field.get(env);
//	            Map<String, String> map = (Map<String, String>) obj;
//	            map.clear();
//	            map.putAll(newenv);
//	            field.setAccessible(false);
//	        }
//	    }
//	}
		
		final Vector v = new Vector();

	}

	public static void p(final Helper h, final String n){
		System.out.println("====================================");
		System.out.println("============  "+n+"  ============");
		System.out.println(h.get(n));
		System.out.println(h.is(n));
		System.out.println(h.getDouble(n));
		System.out.println(h.getLong(n));
		System.out.println(h.getFloat(n));
		System.out.println(h.getInt(n));
		System.out.println(h.getString(n));
		System.out.println("====================================");
	}
}
